import http from '@/plugins/aixos'

export function delManyBet(id: number) {
  return http.request({
    url: `bet/many/${id}`,
    method: 'DELETE',
  })
}

export function addManyBet(data: BetModel[]) {
  return http.request<BetModel[]>({
    url: `bet/many`,
    method: 'POST',
    data,
  })
}

export function findAllBet(args: Record<string, any>) {
  const url =
    `bet?` +
    Object.entries(args)
      .map(([key, value]) => `${key}=${value}`)
      .join('&')
  return http.request<BetViewModel[]>({
    url,
    method: 'GET',
  })
}
